package plugin;

public class Personne {
	private String nom;
	private String prenom;
	private int age;
	private String ville;
	
	public Personne(String nom, String prenom, int age, String ville) {
		this.nom = nom;
		this.prenom = prenom;
		this.age = age;
		this.ville = ville;
	}
	
	public String getNom() {
		return nom;
	}
	
	public void setNom(String nom) {
		this.nom = nom;
	}
	
	public String getPrenom() {
		return prenom;
	}
	
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}
	
	public int getAge() {
		return age;
	}
	
	public void setAge(int age) {
		this.age = age;
	}
	
	public String getVille() {
		return ville;
	}
	
	public void setVille(String ville) {
		this.ville = ville;
	}
	
	public boolean equals(Personne p){
		boolean retour=true;
		retour=retour && this.age==p.getAge();
		retour=retour && this.nom.equals(p.getNom());
		retour=retour && this.prenom.equals(p.getPrenom());
		retour=retour && this.ville.equals(p.getVille());
		return retour;
	}
	
	public void affiche(){
		System.out.println(this.prenom+" "+this.nom+" a "+this.age+ " et habite à "+this.ville);
	}
	
}
